package org.example.tialsproject.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/*响应类*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseResult {
    private Integer code;
    private String message;
    private Object data;



    public static ResponseResult success(Object data) {
        return new ResponseResult(1, "success", data);
    }

    public static ResponseResult success() {
        return new ResponseResult(1, "success", null);
    }

    public static ResponseResult error( String message) {
        return new ResponseResult(0, message, null);
    }
}
